<?php

namespace App\Http\Controllers\Api;

use App\Http\Controllers\Controller;
use App\Http\Requests\UserContext;
use App\Http\Services\PlatformService;
use App\Http\Traits\ResponseJson;

class PlatformController extends Controller
{
    use ResponseJson;

    protected $platformService;

    public function __construct(PlatformService $platformService)
    {
        $this->platformService = $platformService;
    }


    /**
     * 打卡范围
     * @return \Illuminate\Http\JsonResponse
     */
    public function pouchCardPoint()
    {
        $data = $this->platformService->pouchCardPoint();
        return $this->returnJson($data);
    }

    public function searchCampusType()
    {
        $data = $this->platformService->searchCampusType();
        return $this->returnJson($data);
    }

    public function resourceList()
    {
        $data = $this->platformService->resourceList();
        return $this->returnJson($data);
    }

    public function articleDetail()
    {
        $data = $this->platformService->articleDetail();
        return $this->returnJson($data);
    }

    public function qqMapLine()
    {
        $data = $this->platformService->qqMapLine();
        return $this->returnJson($data);
    }

    public function wechatMessageList()
    {
        $data = $this->platformService->wechatMessageList();
        return $this->returnJson($data);
    }

    public function getMapSearch()
    {
        $data = $this->platformService->getMapSearch();
        return $this->returnJson($data);
    }

    public function benefitList(UserContext $userContext)
    {
        $data = $this->platformService->benefitList($userContext);
        return $this->returnJson($data);
    }

    public function scoreGoodsList(UserContext $userContext)
    {
        $data = $this->platformService->scoreGoodsList($userContext);
        return $this->returnJson($data);
    }

    public function benefitDetail(UserContext $userContext)
    {
        $data = $this->platformService->benefitDetail($userContext);
        return $this->returnJson($data);
    }

    public function scoreGoodsDetail(UserContext $userContext)
    {
        $data = $this->platformService->scoreGoodsDetail($userContext);
        return $this->returnJson($data);
    }
}
